<?php

//  define('SHOW_VARIABLES', 1);
//  define('DEBUG_LEVEL', 1);

//  error_reporting(E_ALL ^ E_NOTICE);
//  ini_set('display_errors', 'On');

set_include_path('.' . PATH_SEPARATOR . get_include_path());


require_once 'components/utils/system_utils.php';

//  SystemUtils::DisableMagicQuotesRuntime();

SystemUtils::SetTimeZoneIfNeed('Europe/Belgrade');

function GetGlobalConnectionOptions()
{
    return array(
  'server' => 'sql.comedincantopato.it',
  'port' => '3306',
  'username' => 'comedinc50360',
  'password' => 'come00745',
  'database' => 'comedinc50360'
);
}

function GetPageInfos()
{
    $result = array();
    $result[] = array('caption' => 'Giocatori', 'short_caption' => 'Giocatori', 'filename' => 'giocatori.php', 'name' => 'giocatori');
    $result[] = array('caption' => 'Presenze', 'short_caption' => 'Presenze', 'filename' => 'presenze.php', 'name' => 'presenze');
    $result[] = array('caption' => 'Squadre', 'short_caption' => 'Squadre', 'filename' => 'squadre.php', 'name' => 'squadre');
    $result[] = array('caption' => 'Stagione Lookup', 'short_caption' => 'Stagione Lookup', 'filename' => 'stagione_lookup.php', 'name' => 'stagione_lookup');
    $result[] = array('caption' => 'Type Lookup', 'short_caption' => 'Type Lookup', 'filename' => 'type_lookup.php', 'name' => 'type_lookup');
    return $result;
}

function GetPagesHeader()
{
    return
    '<div style="width: 100%; color: red;"><h2 style="color: red;">This website was created by evaluation version of PHP Generator for MySQL Professional.</h2><h2 style="color: red;">This warning message will not appear on website created by a paid-for version of PHP Generator for MySQL Professional.</h2></div>';
}

function GetPagesFooter()
{
    return
        '<div style="width: 100%; text-align: center;" align="center"><div style="text-align: right; padding: 4px; border: 1px solid black;"><a href="http://www.sqlmaestro.com/products/mysql/phpgenerator/">(C) 2002-2009 SQL Maestro Group</a></div></div>'; 
    }

function ApplyCommonPageSettings($page, $grid)
{
    $page->SetShowUserAuthBar(true);
    $grid->BeforeUpdateRecord->AddListener('Global_BeforeUpdateHandler');
    $grid->BeforeDeleteRecord->AddListener('Global_BeforeDeleteHandler');
    $grid->BeforeInsertRecord->AddListener('Global_BeforeInsertHandler');
}

/*
  Default code page: 1252
*/
function GetAnsiEncoding() { return 'windows-1252'; }

function Global_BeforeUpdateHandler($rowData, &$cancel, &$message)
{

}

function Global_BeforeDeleteHandler($rowData, &$cancel, &$message)
{

}

function Global_BeforeInsertHandler($rowData, &$cancel, &$message)
{

}

?>